package com.service;

import com.VO.BattleUserVO;
import com.VO.PowerRankVO;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dao.TalkPokemonUserMapper;
import com.entity.TalkPokemonUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author LiYuan
 * @since 2021-10-30
 */
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
public class TalkPokemonUserServiceImpl extends ServiceImpl<TalkPokemonUserMapper, TalkPokemonUser> implements ITalkPokemonUserService {
    @Resource
    private TalkPokemonUserMapper talkPokemonUserMapper;

    @Override
    public BattleUserVO getBattleUserInfo(Integer userId) {


        return talkPokemonUserMapper.getBattleUserInfo(userId);
    }

    @Override
    public List<PowerRankVO> powerRankList() {

        List<PowerRankVO> powerRankVOS = talkPokemonUserMapper.powerRankList();

        return powerRankVOS;
    }
}
